<?php
//分页获取商品总数
$Count = mysql_fetch_assoc(mysql_query("select count(*) as tmp from goods_items where user_id=$userid"));
$allCount = $Count["tmp"];
//被喜欢数
$likeNo = mysql_fetch_assoc(mysql_query("select sum(favorite) from goods_items where state=2 and user_id=$userid"));
?>
<!--个人信息-->
<div class="p_face"><a href="../userhome.php?uid=<?php echo $userid; ?>" target="_blank" ><img src="<?PHP if (file_exists("headpic/avatar_big/".$userid."_big.jpg")) echo "headpic/avatar_big/".$userid."_big.jpg"; else echo "default_headpic_big.jpg"; ?>" alt="我的头像" width="165" height="200" id="person-avatar"></a></div>
<div class="p_nickname"><span class="online"><a href="../userhome.php?uid=<?php echo $userid; ?>"  target="_blank" title="<?PHP echo $nickname; ?>"><?PHP echo $nickname; ?></a></span></div>
<div class="p_statistic">
    <ul class="userP_statistic">
        <li title="我有<?php echo $allCount; ?>个宝贝">
            <span class="p_f">我分享的宝贝</span>
            <span class="p_nums"><?php echo $allCount; ?></span>
        </li>
        <li style="border-right: none;"  title="有<?php echo  $likeNo["sum(favorite)"]; ?>人喜欢我的宝贝">
            <span class="p_f">被喜欢宝贝</span>
            <span class="p_nums"><?php if (isset($likeNo["sum(favorite)"])) echo $likeNo["sum(favorite)"]; else echo "0"; ?></span>
        </li>
    </ul>
</div>
 <!--侧栏导航 开始-->
<div class="SidebarNav">
    <ul>
        <li class="b1"><a href="edit.php"><span>个人信息</span></a></li>
        <li class="b2"><a href="index.php"><span>分享宝贝</span></a></li>
        <li class="b3" style="display:none"><a href="invitefriend.php"><span>邀请</span></a></li>
        <li class="b4" style="display:none"><a href="index.php"><span>客服</span></a></li>
        <li class="b20"><a href="http://www.tusijie.com/logout.php"><span>退出</span></a></li>
    </ul>
</div>
<!--侧栏导航 结束--->